'''
Date: 2023-03-25 20:07:23
LastEditors: wkl
LastEditTime: 2023-05-06 19:44:53
FilePath: /demo/demo11.py
'''
import requests

session = requests.session()
url = 'https://api.xinti.com/chart/queryPrizeHistoryByGameCode'

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36'
}
data = {"ClientSource": 3, "Param": {"GameCode": "DLT", "IssuseCount": 20},
        "Date": 1604400132658, "Token": "", "Sign": "4edaf737113b3411911c5b7a2ccd8640"}

res = requests.post(url, headers=headers, json=data)
# print(res)
js_res = res.json()
# print(js_res)
js_data = js_res['Value']['GameHistoryInfo']
# print(js_data)
for d in js_data:
    # print(d)
    qishu = d['IssuseNumber']
    riqi = d['PrizeTime']
    num = d['WinNumber']
    print('开奖期数：', qishu, '\t', '开奖日期：', riqi, '\t', '开奖号码：', num)
